// import { defineStore } from 'pinia'

import { userStore } from './user'
const user_store = userStore()
export function loadLocalLogin() {
  const token = localStorage.getItem('token')
  const userInfo = localStorage.getItem('userInfo')
  if (token) {
    user_store.changeLoginState(token)
  }
  if (userInfo) {
    user_store.changeUserInfoState(JSON.parse(userInfo))
  }
}
